﻿

namespace Ekton_Manage_InfrastructureCore.Common
{
    public class Message
    {

        public bool success { get; set; } = true;
        public int code { get; set; } = 200;
        public string msg { get; set; } = "操作成功";
        public object data { get; set; }

        public Message(bool success)
        {
            this.success = success;
            code = 200;
            msg = "操作成功";
        }

        public Message(bool success, int code)
        {
            this.success = success;
            this.code = code;
            msg = success ? "操作成功" : "操作失败";
        }

        public Message(object data)
        {
            this.success = success;
            this.code = code;
            msg = msg;
            this.data = data;
        }

        public Message(string msg, bool success,int code)
        {
            this.success = success;
            this.code = code;
            this.msg = msg;
            this.data = data;
        }
    }
}
